//===----------------------------------------------------------------------===//
//
// This source file is part of the Soto for AWS open source project
//
// Copyright (c) 2017-2021 the Soto project authors
// Licensed under Apache License v2.0
//
// See LICENSE.txt for license information
// See CONTRIBUTORS.txt for the list of Soto project authors
//
// SPDX-License-Identifier: Apache-2.0
//
//===----------------------------------------------------------------------===//

// THIS FILE IS AUTOMATICALLY GENERATED by https://github.com/soto-project/soto/tree/main/CodeGenerator. DO NOT EDIT.

import Foundation
import SotoCore

extension MigrationHub {
    // MARK: Enums

    public enum ApplicationStatus: String, CustomStringConvertible, Codable {
        case completed = "COMPLETED"
        case inProgress = "IN_PROGRESS"
        case notStarted = "NOT_STARTED"
        public var description: String { return self.rawValue }
    }

    public enum ResourceAttributeType: String, CustomStringConvertible, Codable {
        case biosId = "BIOS_ID"
        case fqdn = "FQDN"
        case ipv4Address = "IPV4_ADDRESS"
        case ipv6Address = "IPV6_ADDRESS"
        case macAddress = "MAC_ADDRESS"
        case motherboardSerialNumber = "MOTHERBOARD_SERIAL_NUMBER"
        case vmManagedObjectReference = "VM_MANAGED_OBJECT_REFERENCE"
        case vmManagerId = "VM_MANAGER_ID"
        case vmName = "VM_NAME"
        case vmPath = "VM_PATH"
        public var description: String { return self.rawValue }
    }

    public enum Status: String, CustomStringConvertible, Codable {
        case completed = "COMPLETED"
        case failed = "FAILED"
        case inProgress = "IN_PROGRESS"
        case notStarted = "NOT_STARTED"
        public var description: String { return self.rawValue }
    }

    // MARK: Shapes

    public struct ApplicationState: AWSDecodableShape {
        /// The configurationId from the Application Discovery Service that uniquely identifies an application.
        public let applicationId: String?
        /// The current status of an application.
        public let applicationStatus: ApplicationStatus?
        /// The timestamp when the application status was last updated.
        public let lastUpdatedTime: Date?

        public init(applicationId: String? = nil, applicationStatus: ApplicationStatus? = nil, lastUpdatedTime: Date? = nil) {
            self.applicationId = applicationId
            self.applicationStatus = applicationStatus
            self.lastUpdatedTime = lastUpdatedTime
        }

        private enum CodingKeys: String, CodingKey {
            case applicationId = "ApplicationId"
            case applicationStatus = "ApplicationStatus"
            case lastUpdatedTime = "LastUpdatedTime"
        }
    }

    public struct AssociateCreatedArtifactRequest: AWSEncodableShape {
        /// An ARN of the AWS resource related to the migration (e.g., AMI, EC2 instance, RDS instance, etc.)
        public let createdArtifact: CreatedArtifact
        /// Optional boolean flag to indicate whether any effect should take place. Used to test if the caller has permission to make the call.
        public let dryRun: Bool?
        /// Unique identifier that references the migration task. Do not store personal data in this field.
        public let migrationTaskName: String
        /// The name of the ProgressUpdateStream.
        public let progressUpdateStream: String

        public init(createdArtifact: CreatedArtifact, dryRun: Bool? = nil, migrationTaskName: String, progressUpdateStream: String) {
            self.createdArtifact = createdArtifact
            self.dryRun = dryRun
            self.migrationTaskName = migrationTaskName
            self.progressUpdateStream = progressUpdateStream
        }

        public func validate(name: String) throws {
            try self.createdArtifact.validate(name: "\(name).createdArtifact")
            try self.validate(self.migrationTaskName, name: "migrationTaskName", parent: name, max: 256)
            try self.validate(self.migrationTaskName, name: "migrationTaskName", parent: name, min: 1)
            try self.validate(self.migrationTaskName, name: "migrationTaskName", parent: name, pattern: "[^:|]+")
            try self.validate(self.progressUpdateStream, name: "progressUpdateStream", parent: name, max: 50)
            try self.validate(self.progressUpdateStream, name: "progressUpdateStream", parent: name, min: 1)
            try self.validate(self.progressUpdateStream, name: "progressUpdateStream", parent: name, pattern: "[^/:|\\000-\\037]+")
        }

        private enum CodingKeys: String, CodingKey {
            case createdArtifact = "CreatedArtifact"
            case dryRun = "DryRun"
            case migrationTaskName = "MigrationTaskName"
            case progressUpdateStream = "ProgressUpdateStream"
        }
    }

    public struct AssociateCreatedArtifactResult: AWSDecodableShape {
        public init() {}
    }

    public struct AssociateDiscoveredResourceRequest: AWSEncodableShape {
        /// Object representing a Resource.
        public let discoveredResource: DiscoveredResource
        /// Optional boolean flag to indicate whether any effect should take place. Used to test if the caller has permission to make the call.
        public let dryRun: Bool?
        /// The identifier given to the MigrationTask. Do not store personal data in this field.
        public let migrationTaskName: String
        /// The name of the ProgressUpdateStream.
        public let progressUpdateStream: String

        public init(discoveredResource: DiscoveredResource, dryRun: Bool? = nil, migrationTaskName: String, progressUpdateStream: String) {
            self.discoveredResource = discoveredResource
            self.dryRun = dryRun
            self.migrationTaskName = migrationTaskName
            self.progressUpdateStream = progressUpdateStream
        }

        public func validate(name: String) throws {
            try self.discoveredResource.validate(name: "\(name).discoveredResource")
            try self.validate(self.migrationTaskName, name: "migrationTaskName", parent: name, max: 256)
            try self.validate(self.migrationTaskName, name: "migrationTaskName", parent: name, min: 1)
            try self.validate(self.migrationTaskName, name: "migrationTaskName", parent: name, pattern: "[^:|]+")
            try self.validate(self.progressUpdateStream, name: "progressUpdateStream", parent: name, max: 50)
            try self.validate(self.progressUpdateStream, name: "progressUpdateStream", parent: name, min: 1)
            try self.validate(self.progressUpdateStream, name: "progressUpdateStream", parent: name, pattern: "[^/:|\\000-\\037]+")
        }

        private enum CodingKeys: String, CodingKey {
            case discoveredResource = "DiscoveredResource"
            case dryRun = "DryRun"
            case migrationTaskName = "MigrationTaskName"
            case progressUpdateStream = "ProgressUpdateStream"
        }
    }

    public struct AssociateDiscoveredResourceResult: AWSDecodableShape {
        public init() {}
    }

    public struct CreateProgressUpdateStreamRequest: AWSEncodableShape {
        /// Optional boolean flag to indicate whether any effect should take place. Used to test if the caller has permission to make the call.
        public let dryRun: Bool?
        /// The name of the ProgressUpdateStream. Do not store personal data in this field.
        public let progressUpdateStreamName: String

        public init(dryRun: Bool? = nil, progressUpdateStreamName: String) {
            self.dryRun = dryRun
            self.progressUpdateStreamName = progressUpdateStreamName
        }

        public func validate(name: String) throws {
            try self.validate(self.progressUpdateStreamName, name: "progressUpdateStreamName", parent: name, max: 50)
            try self.validate(self.progressUpdateStreamName, name: "progressUpdateStreamName", parent: name, min: 1)
            try self.validate(self.progressUpdateStreamName, name: "progressUpdateStreamName", parent: name, pattern: "[^/:|\\000-\\037]+")
        }

        private enum CodingKeys: String, CodingKey {
            case dryRun = "DryRun"
            case progressUpdateStreamName = "ProgressUpdateStreamName"
        }
    }

    public struct CreateProgressUpdateStreamResult: AWSDecodableShape {
        public init() {}
    }

    public struct CreatedArtifact: AWSEncodableShape & AWSDecodableShape {
        /// A description that can be free-form text to record additional detail about the artifact for clarity or for later reference.
        public let description: String?
        /// An ARN that uniquely identifies the result of a migration task.
        public let name: String

        public init(description: String? = nil, name: String) {
            self.description = description
            self.name = name
        }

        public func validate(name: String) throws {
            try self.validate(self.description, name: "description", parent: name, max: 500)
            try self.validate(self.description, name: "description", parent: name, min: 0)
            try self.validate(self.description, name: "description", parent: name, pattern: "^.{0,500}$")
            try self.validate(self.name, name: "name", parent: name, max: 1600)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "arn:[a-z-]+:[a-z0-9-]+:(?:[a-z0-9-]+|):(?:[0-9]{12}|):.*")
        }

        private enum CodingKeys: String, CodingKey {
            case description = "Description"
            case name = "Name"
        }
    }

    public struct DeleteProgressUpdateStreamRequest: AWSEncodableShape {
        /// Optional boolean flag to indicate whether any effect should take place. Used to test if the caller has permission to make the call.
        public let dryRun: Bool?
        /// The name of the ProgressUpdateStream. Do not store personal data in this field.
        public let progressUpdateStreamName: String

        public init(dryRun: Bool? = nil, progressUpdateStreamName: String) {
            self.dryRun = dryRun
            self.progressUpdateStreamName = progressUpdateStreamName
        }

        public func validate(name: String) throws {
            try self.validate(self.progressUpdateStreamName, name: "progressUpdateStreamName", parent: name, max: 50)
            try self.validate(self.progressUpdateStreamName, name: "progressUpdateStreamName", parent: name, min: 1)
            try self.validate(self.progressUpdateStreamName, name: "progressUpdateStreamName", parent: name, pattern: "[^/:|\\000-\\037]+")
        }

        private enum CodingKeys: String, CodingKey {
            case dryRun = "DryRun"
            case progressUpdateStreamName = "ProgressUpdateStreamName"
        }
    }

    public struct DeleteProgressUpdateStreamResult: AWSDecodableShape {
        public init() {}
    }

    public struct DescribeApplicationStateRequest: AWSEncodableShape {
        /// The configurationId in Application Discovery Service that uniquely identifies the grouped application.
        public let applicationId: String

        public init(applicationId: String) {
            self.applicationId = applicationId
        }

        public func validate(name: String) throws {
            try self.validate(self.applicationId, name: "applicationId", parent: name, max: 1600)
            try self.validate(self.applicationId, name: "applicationId", parent: name, min: 1)
            try self.validate(self.applicationId, name: "applicationId", parent: name, pattern: "^.{1,1600}$")
        }

        private enum CodingKeys: String, CodingKey {
            case applicationId = "ApplicationId"
        }
    }

    public struct DescribeApplicationStateResult: AWSDecodableShape {
        /// Status of the application - Not Started, In-Progress, Complete.
        public let applicationStatus: ApplicationStatus?
        /// The timestamp when the application status was last updated.
        public let lastUpdatedTime: Date?

        public init(applicationStatus: ApplicationStatus? = nil, lastUpdatedTime: Date? = nil) {
            self.applicationStatus = applicationStatus
            self.lastUpdatedTime = lastUpdatedTime
        }

        private enum CodingKeys: String, CodingKey {
            case applicationStatus = "ApplicationStatus"
            case lastUpdatedTime = "LastUpdatedTime"
        }
    }

    public struct DescribeMigrationTaskRequest: AWSEncodableShape {
        /// The identifier given to the MigrationTask. Do not store personal data in this field.
        public let migrationTaskName: String
        /// The name of the ProgressUpdateStream.
        public let progressUpdateStream: String

        public init(migrationTaskName: String, progressUpdateStream: String) {
            self.migrationTaskName = migrationTaskName
            self.progressUpdateStream = progressUpdateStream
        }

        public func validate(name: String) throws {
            try self.validate(self.migrationTaskName, name: "migrationTaskName", parent: name, max: 256)
            try self.validate(self.migrationTaskName, name: "migrationTaskName", parent: name, min: 1)
            try self.validate(self.migrationTaskName, name: "migrationTaskName", parent: name, pattern: "[^:|]+")
            try self.validate(self.progressUpdateStream, name: "progressUpdateStream", parent: name, max: 50)
            try self.validate(self.progressUpdateStream, name: "progressUpdateStream", parent: name, min: 1)
            try self.validate(self.progressUpdateStream, name: "progressUpdateStream", parent: name, pattern: "[^/:|\\000-\\037]+")
        }

        private enum CodingKeys: String, CodingKey {
            case migrationTaskName = "MigrationTaskName"
            case progressUpdateStream = "ProgressUpdateStream"
        }
    }

    public struct DescribeMigrationTaskResult: AWSDecodableShape {
        /// Object encapsulating information about the migration task.
        public let migrationTask: MigrationTask?

        public init(migrationTask: MigrationTask? = nil) {
            self.migrationTask = migrationTask
        }

        private enum CodingKeys: String, CodingKey {
            case migrationTask = "MigrationTask"
        }
    }

    public struct DisassociateCreatedArtifactRequest: AWSEncodableShape {
        /// An ARN of the AWS resource related to the migration (e.g., AMI, EC2 instance, RDS instance, etc.)
        public let createdArtifactName: String
        /// Optional boolean flag to indicate whether any effect should take place. Used to test if the caller has permission to make the call.
        public let dryRun: Bool?
        /// Unique identifier that references the migration task to be disassociated with the artifact. Do not store personal data in this field.
        public let migrationTaskName: String
        /// The name of the ProgressUpdateStream.
        public let progressUpdateStream: String

        public init(createdArtifactName: String, dryRun: Bool? = nil, migrationTaskName: String, progressUpdateStream: String) {
            self.createdArtifactName = createdArtifactName
            self.dryRun = dryRun
            self.migrationTaskName = migrationTaskName
            self.progressUpdateStream = progressUpdateStream
        }

        public func validate(name: String) throws {
            try self.validate(self.createdArtifactName, name: "createdArtifactName", parent: name, max: 1600)
            try self.validate(self.createdArtifactName, name: "createdArtifactName", parent: name, min: 1)
            try self.validate(self.createdArtifactName, name: "createdArtifactName", parent: name, pattern: "arn:[a-z-]+:[a-z0-9-]+:(?:[a-z0-9-]+|):(?:[0-9]{12}|):.*")
            try self.validate(self.migrationTaskName, name: "migrationTaskName", parent: name, max: 256)
            try self.validate(self.migrationTaskName, name: "migrationTaskName", parent: name, min: 1)
            try self.validate(self.migrationTaskName, name: "migrationTaskName", parent: name, pattern: "[^:|]+")
            try self.validate(self.progressUpdateStream, name: "progressUpdateStream", parent: name, max: 50)
            try self.validate(self.progressUpdateStream, name: "progressUpdateStream", parent: name, min: 1)
            try self.validate(self.progressUpdateStream, name: "progressUpdateStream", parent: name, pattern: "[^/:|\\000-\\037]+")
        }

        private enum CodingKeys: String, CodingKey {
            case createdArtifactName = "CreatedArtifactName"
            case dryRun = "DryRun"
            case migrationTaskName = "MigrationTaskName"
            case progressUpdateStream = "ProgressUpdateStream"
        }
    }

    public struct DisassociateCreatedArtifactResult: AWSDecodableShape {
        public init() {}
    }

    public struct DisassociateDiscoveredResourceRequest: AWSEncodableShape {
        /// ConfigurationId of the Application Discovery Service resource to be disassociated.
        public let configurationId: String
        /// Optional boolean flag to indicate whether any effect should take place. Used to test if the caller has permission to make the call.
        public let dryRun: Bool?
        /// The identifier given to the MigrationTask. Do not store personal data in this field.
        public let migrationTaskName: String
        /// The name of the ProgressUpdateStream.
        public let progressUpdateStream: String

        public init(configurationId: String, dryRun: Bool? = nil, migrationTaskName: String, progressUpdateStream: String) {
            self.configurationId = configurationId
            self.dryRun = dryRun
            self.migrationTaskName = migrationTaskName
            self.progressUpdateStream = progressUpdateStream
        }

        public func validate(name: String) throws {
            try self.validate(self.configurationId, name: "configurationId", parent: name, max: 1600)
            try self.validate(self.configurationId, name: "configurationId", parent: name, min: 1)
            try self.validate(self.configurationId, name: "configurationId", parent: name, pattern: "^.{1,1600}$")
            try self.validate(self.migrationTaskName, name: "migrationTaskName", parent: name, max: 256)
            try self.validate(self.migrationTaskName, name: "migrationTaskName", parent: name, min: 1)
            try self.validate(self.migrationTaskName, name: "migrationTaskName", parent: name, pattern: "[^:|]+")
            try self.validate(self.progressUpdateStream, name: "progressUpdateStream", parent: name, max: 50)
            try self.validate(self.progressUpdateStream, name: "progressUpdateStream", parent: name, min: 1)
            try self.validate(self.progressUpdateStream, name: "progressUpdateStream", parent: name, pattern: "[^/:|\\000-\\037]+")
        }

        private enum CodingKeys: String, CodingKey {
            case configurationId = "ConfigurationId"
            case dryRun = "DryRun"
            case migrationTaskName = "MigrationTaskName"
            case progressUpdateStream = "ProgressUpdateStream"
        }
    }

    public struct DisassociateDiscoveredResourceResult: AWSDecodableShape {
        public init() {}
    }

    public struct DiscoveredResource: AWSEncodableShape & AWSDecodableShape {
        /// The configurationId in Application Discovery Service that uniquely identifies the on-premise resource.
        public let configurationId: String
        /// A description that can be free-form text to record additional detail about the discovered resource for clarity or later reference.
        public let description: String?

        public init(configurationId: String, description: String? = nil) {
            self.configurationId = configurationId
            self.description = description
        }

        public func validate(name: String) throws {
            try self.validate(self.configurationId, name: "configurationId", parent: name, max: 1600)
            try self.validate(self.configurationId, name: "configurationId", parent: name, min: 1)
            try self.validate(self.configurationId, name: "configurationId", parent: name, pattern: "^.{1,1600}$")
            try self.validate(self.description, name: "description", parent: name, max: 500)
            try self.validate(self.description, name: "description", parent: name, min: 0)
            try self.validate(self.description, name: "description", parent: name, pattern: "^.{0,500}$")
        }

        private enum CodingKeys: String, CodingKey {
            case configurationId = "ConfigurationId"
            case description = "Description"
        }
    }

    public struct ImportMigrationTaskRequest: AWSEncodableShape {
        /// Optional boolean flag to indicate whether any effect should take place. Used to test if the caller has permission to make the call.
        public let dryRun: Bool?
        /// Unique identifier that references the migration task. Do not store personal data in this field.
        public let migrationTaskName: String
        /// The name of the ProgressUpdateStream. &gt;
        public let progressUpdateStream: String

        public init(dryRun: Bool? = nil, migrationTaskName: String, progressUpdateStream: String) {
            self.dryRun = dryRun
            self.migrationTaskName = migrationTaskName
            self.progressUpdateStream = progressUpdateStream
        }

        public func validate(name: String) throws {
            try self.validate(self.migrationTaskName, name: "migrationTaskName", parent: name, max: 256)
            try self.validate(self.migrationTaskName, name: "migrationTaskName", parent: name, min: 1)
            try self.validate(self.migrationTaskName, name: "migrationTaskName", parent: name, pattern: "[^:|]+")
            try self.validate(self.progressUpdateStream, name: "progressUpdateStream", parent: name, max: 50)
            try self.validate(self.progressUpdateStream, name: "progressUpdateStream", parent: name, min: 1)
            try self.validate(self.progressUpdateStream, name: "progressUpdateStream", parent: name, pattern: "[^/:|\\000-\\037]+")
        }

        private enum CodingKeys: String, CodingKey {
            case dryRun = "DryRun"
            case migrationTaskName = "MigrationTaskName"
            case progressUpdateStream = "ProgressUpdateStream"
        }
    }

    public struct ImportMigrationTaskResult: AWSDecodableShape {
        public init() {}
    }

    public struct ListApplicationStatesRequest: AWSEncodableShape {
        /// The configurationIds from the Application Discovery Service that uniquely identifies your applications.
        public let applicationIds: [String]?
        /// Maximum number of results to be returned per page.
        public let maxResults: Int?
        /// If a NextToken was returned by a previous call, there are more results available. To retrieve the next page of results, make the call again using the returned token in NextToken.
        public let nextToken: String?

        public init(applicationIds: [String]? = nil, maxResults: Int? = nil, nextToken: String? = nil) {
            self.applicationIds = applicationIds
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.applicationIds?.forEach {
                try validate($0, name: "applicationIds[]", parent: name, max: 1600)
                try validate($0, name: "applicationIds[]", parent: name, min: 1)
                try validate($0, name: "applicationIds[]", parent: name, pattern: "^.{1,1600}$")
            }
            try self.validate(self.applicationIds, name: "applicationIds", parent: name, max: 100)
            try self.validate(self.applicationIds, name: "applicationIds", parent: name, min: 1)
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 100)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 2048)
            try self.validate(self.nextToken, name: "nextToken", parent: name, min: 0)
            try self.validate(self.nextToken, name: "nextToken", parent: name, pattern: "^[a-zA-Z0-9\\/\\+\\=]{0,2048}$")
        }

        private enum CodingKeys: String, CodingKey {
            case applicationIds = "ApplicationIds"
            case maxResults = "MaxResults"
            case nextToken = "NextToken"
        }
    }

    public struct ListApplicationStatesResult: AWSDecodableShape {
        /// A list of Applications that exist in Application Discovery Service.
        public let applicationStateList: [ApplicationState]?
        /// If a NextToken was returned by a previous call, there are more results available. To retrieve the next page of results, make the call again using the returned token in NextToken.
        public let nextToken: String?

        public init(applicationStateList: [ApplicationState]? = nil, nextToken: String? = nil) {
            self.applicationStateList = applicationStateList
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case applicationStateList = "ApplicationStateList"
            case nextToken = "NextToken"
        }
    }

    public struct ListCreatedArtifactsRequest: AWSEncodableShape {
        /// Maximum number of results to be returned per page.
        public let maxResults: Int?
        /// Unique identifier that references the migration task. Do not store personal data in this field.
        public let migrationTaskName: String
        /// If a NextToken was returned by a previous call, there are more results available. To retrieve the next page of results, make the call again using the returned token in NextToken.
        public let nextToken: String?
        /// The name of the ProgressUpdateStream.
        public let progressUpdateStream: String

        public init(maxResults: Int? = nil, migrationTaskName: String, nextToken: String? = nil, progressUpdateStream: String) {
            self.maxResults = maxResults
            self.migrationTaskName = migrationTaskName
            self.nextToken = nextToken
            self.progressUpdateStream = progressUpdateStream
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 10)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.migrationTaskName, name: "migrationTaskName", parent: name, max: 256)
            try self.validate(self.migrationTaskName, name: "migrationTaskName", parent: name, min: 1)
            try self.validate(self.migrationTaskName, name: "migrationTaskName", parent: name, pattern: "[^:|]+")
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 2048)
            try self.validate(self.nextToken, name: "nextToken", parent: name, min: 0)
            try self.validate(self.nextToken, name: "nextToken", parent: name, pattern: "^[a-zA-Z0-9\\/\\+\\=]{0,2048}$")
            try self.validate(self.progressUpdateStream, name: "progressUpdateStream", parent: name, max: 50)
            try self.validate(self.progressUpdateStream, name: "progressUpdateStream", parent: name, min: 1)
            try self.validate(self.progressUpdateStream, name: "progressUpdateStream", parent: name, pattern: "[^/:|\\000-\\037]+")
        }

        private enum CodingKeys: String, CodingKey {
            case maxResults = "MaxResults"
            case migrationTaskName = "MigrationTaskName"
            case nextToken = "NextToken"
            case progressUpdateStream = "ProgressUpdateStream"
        }
    }

    public struct ListCreatedArtifactsResult: AWSDecodableShape {
        /// List of created artifacts up to the maximum number of results specified in the request.
        public let createdArtifactList: [CreatedArtifact]?
        /// If there are more created artifacts than the max result, return the next token to be passed to the next call as a bookmark of where to start from.
        public let nextToken: String?

        public init(createdArtifactList: [CreatedArtifact]? = nil, nextToken: String? = nil) {
            self.createdArtifactList = createdArtifactList
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case createdArtifactList = "CreatedArtifactList"
            case nextToken = "NextToken"
        }
    }

    public struct ListDiscoveredResourcesRequest: AWSEncodableShape {
        /// The maximum number of results returned per page.
        public let maxResults: Int?
        /// The name of the MigrationTask. Do not store personal data in this field.
        public let migrationTaskName: String
        /// If a NextToken was returned by a previous call, there are more results available. To retrieve the next page of results, make the call again using the returned token in NextToken.
        public let nextToken: String?
        /// The name of the ProgressUpdateStream.
        public let progressUpdateStream: String

        public init(maxResults: Int? = nil, migrationTaskName: String, nextToken: String? = nil, progressUpdateStream: String) {
            self.maxResults = maxResults
            self.migrationTaskName = migrationTaskName
            self.nextToken = nextToken
            self.progressUpdateStream = progressUpdateStream
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 10)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.migrationTaskName, name: "migrationTaskName", parent: name, max: 256)
            try self.validate(self.migrationTaskName, name: "migrationTaskName", parent: name, min: 1)
            try self.validate(self.migrationTaskName, name: "migrationTaskName", parent: name, pattern: "[^:|]+")
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 2048)
            try self.validate(self.nextToken, name: "nextToken", parent: name, min: 0)
            try self.validate(self.nextToken, name: "nextToken", parent: name, pattern: "^[a-zA-Z0-9\\/\\+\\=]{0,2048}$")
            try self.validate(self.progressUpdateStream, name: "progressUpdateStream", parent: name, max: 50)
            try self.validate(self.progressUpdateStream, name: "progressUpdateStream", parent: name, min: 1)
            try self.validate(self.progressUpdateStream, name: "progressUpdateStream", parent: name, pattern: "[^/:|\\000-\\037]+")
        }

        private enum CodingKeys: String, CodingKey {
            case maxResults = "MaxResults"
            case migrationTaskName = "MigrationTaskName"
            case nextToken = "NextToken"
            case progressUpdateStream = "ProgressUpdateStream"
        }
    }

    public struct ListDiscoveredResourcesResult: AWSDecodableShape {
        /// Returned list of discovered resources associated with the given MigrationTask.
        public let discoveredResourceList: [DiscoveredResource]?
        /// If there are more discovered resources than the max result, return the next token to be passed to the next call as a bookmark of where to start from.
        public let nextToken: String?

        public init(discoveredResourceList: [DiscoveredResource]? = nil, nextToken: String? = nil) {
            self.discoveredResourceList = discoveredResourceList
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case discoveredResourceList = "DiscoveredResourceList"
            case nextToken = "NextToken"
        }
    }

    public struct ListMigrationTasksRequest: AWSEncodableShape {
        /// Value to specify how many results are returned per page.
        public let maxResults: Int?
        /// If a NextToken was returned by a previous call, there are more results available. To retrieve the next page of results, make the call again using the returned token in NextToken.
        public let nextToken: String?
        /// Filter migration tasks by discovered resource name.
        public let resourceName: String?

        public init(maxResults: Int? = nil, nextToken: String? = nil, resourceName: String? = nil) {
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.resourceName = resourceName
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 100)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 2048)
            try self.validate(self.nextToken, name: "nextToken", parent: name, min: 0)
            try self.validate(self.nextToken, name: "nextToken", parent: name, pattern: "^[a-zA-Z0-9\\/\\+\\=]{0,2048}$")
            try self.validate(self.resourceName, name: "resourceName", parent: name, max: 1600)
            try self.validate(self.resourceName, name: "resourceName", parent: name, min: 1)
            try self.validate(self.resourceName, name: "resourceName", parent: name, pattern: "^.{1,1600}$")
        }

        private enum CodingKeys: String, CodingKey {
            case maxResults = "MaxResults"
            case nextToken = "NextToken"
            case resourceName = "ResourceName"
        }
    }

    public struct ListMigrationTasksResult: AWSDecodableShape {
        /// Lists the migration task's summary which includes: MigrationTaskName, ProgressPercent, ProgressUpdateStream, Status, and the UpdateDateTime for each task.
        public let migrationTaskSummaryList: [MigrationTaskSummary]?
        /// If there are more migration tasks than the max result, return the next token to be passed to the next call as a bookmark of where to start from.
        public let nextToken: String?

        public init(migrationTaskSummaryList: [MigrationTaskSummary]? = nil, nextToken: String? = nil) {
            self.migrationTaskSummaryList = migrationTaskSummaryList
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case migrationTaskSummaryList = "MigrationTaskSummaryList"
            case nextToken = "NextToken"
        }
    }

    public struct ListProgressUpdateStreamsRequest: AWSEncodableShape {
        /// Filter to limit the maximum number of results to list per page.
        public let maxResults: Int?
        /// If a NextToken was returned by a previous call, there are more results available. To retrieve the next page of results, make the call again using the returned token in NextToken.
        public let nextToken: String?

        public init(maxResults: Int? = nil, nextToken: String? = nil) {
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 100)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 2048)
            try self.validate(self.nextToken, name: "nextToken", parent: name, min: 0)
            try self.validate(self.nextToken, name: "nextToken", parent: name, pattern: "^[a-zA-Z0-9\\/\\+\\=]{0,2048}$")
        }

        private enum CodingKeys: String, CodingKey {
            case maxResults = "MaxResults"
            case nextToken = "NextToken"
        }
    }

    public struct ListProgressUpdateStreamsResult: AWSDecodableShape {
        /// If there are more streams created than the max result, return the next token to be passed to the next call as a bookmark of where to start from.
        public let nextToken: String?
        /// List of progress update streams up to the max number of results passed in the input.
        public let progressUpdateStreamSummaryList: [ProgressUpdateStreamSummary]?

        public init(nextToken: String? = nil, progressUpdateStreamSummaryList: [ProgressUpdateStreamSummary]? = nil) {
            self.nextToken = nextToken
            self.progressUpdateStreamSummaryList = progressUpdateStreamSummaryList
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "NextToken"
            case progressUpdateStreamSummaryList = "ProgressUpdateStreamSummaryList"
        }
    }

    public struct MigrationTask: AWSDecodableShape {
        /// Unique identifier that references the migration task. Do not store personal data in this field.
        public let migrationTaskName: String?
        /// A name that identifies the vendor of the migration tool being used.
        public let progressUpdateStream: String?
        /// Information about the resource that is being migrated. This data will be used to map the task to a resource in the Application Discovery Service repository.
        public let resourceAttributeList: [ResourceAttribute]?
        /// Task object encapsulating task information.
        public let task: Task?
        /// The timestamp when the task was gathered.
        public let updateDateTime: Date?

        public init(migrationTaskName: String? = nil, progressUpdateStream: String? = nil, resourceAttributeList: [ResourceAttribute]? = nil, task: Task? = nil, updateDateTime: Date? = nil) {
            self.migrationTaskName = migrationTaskName
            self.progressUpdateStream = progressUpdateStream
            self.resourceAttributeList = resourceAttributeList
            self.task = task
            self.updateDateTime = updateDateTime
        }

        private enum CodingKeys: String, CodingKey {
            case migrationTaskName = "MigrationTaskName"
            case progressUpdateStream = "ProgressUpdateStream"
            case resourceAttributeList = "ResourceAttributeList"
            case task = "Task"
            case updateDateTime = "UpdateDateTime"
        }
    }

    public struct MigrationTaskSummary: AWSDecodableShape {
        /// Unique identifier that references the migration task. Do not store personal data in this field.
        public let migrationTaskName: String?
        /// Indication of the percentage completion of the task.
        public let progressPercent: Int?
        /// An AWS resource used for access control. It should uniquely identify the migration tool as it is used for all updates made by the tool.
        public let progressUpdateStream: String?
        /// Status of the task.
        public let status: Status?
        /// Detail information of what is being done within the overall status state.
        public let statusDetail: String?
        /// The timestamp when the task was gathered.
        public let updateDateTime: Date?

        public init(migrationTaskName: String? = nil, progressPercent: Int? = nil, progressUpdateStream: String? = nil, status: Status? = nil, statusDetail: String? = nil, updateDateTime: Date? = nil) {
            self.migrationTaskName = migrationTaskName
            self.progressPercent = progressPercent
            self.progressUpdateStream = progressUpdateStream
            self.status = status
            self.statusDetail = statusDetail
            self.updateDateTime = updateDateTime
        }

        private enum CodingKeys: String, CodingKey {
            case migrationTaskName = "MigrationTaskName"
            case progressPercent = "ProgressPercent"
            case progressUpdateStream = "ProgressUpdateStream"
            case status = "Status"
            case statusDetail = "StatusDetail"
            case updateDateTime = "UpdateDateTime"
        }
    }

    public struct NotifyApplicationStateRequest: AWSEncodableShape {
        /// The configurationId in Application Discovery Service that uniquely identifies the grouped application.
        public let applicationId: String
        /// Optional boolean flag to indicate whether any effect should take place. Used to test if the caller has permission to make the call.
        public let dryRun: Bool?
        /// Status of the application - Not Started, In-Progress, Complete.
        public let status: ApplicationStatus
        /// The timestamp when the application state changed.
        public let updateDateTime: Date?

        public init(applicationId: String, dryRun: Bool? = nil, status: ApplicationStatus, updateDateTime: Date? = nil) {
            self.applicationId = applicationId
            self.dryRun = dryRun
            self.status = status
            self.updateDateTime = updateDateTime
        }

        public func validate(name: String) throws {
            try self.validate(self.applicationId, name: "applicationId", parent: name, max: 1600)
            try self.validate(self.applicationId, name: "applicationId", parent: name, min: 1)
            try self.validate(self.applicationId, name: "applicationId", parent: name, pattern: "^.{1,1600}$")
        }

        private enum CodingKeys: String, CodingKey {
            case applicationId = "ApplicationId"
            case dryRun = "DryRun"
            case status = "Status"
            case updateDateTime = "UpdateDateTime"
        }
    }

    public struct NotifyApplicationStateResult: AWSDecodableShape {
        public init() {}
    }

    public struct NotifyMigrationTaskStateRequest: AWSEncodableShape {
        /// Optional boolean flag to indicate whether any effect should take place. Used to test if the caller has permission to make the call.
        public let dryRun: Bool?
        /// Unique identifier that references the migration task. Do not store personal data in this field.
        public let migrationTaskName: String
        /// Number of seconds after the UpdateDateTime within which the Migration Hub can expect an update. If Migration Hub does not receive an update within the specified interval, then the migration task will be considered stale.
        public let nextUpdateSeconds: Int
        /// The name of the ProgressUpdateStream.
        public let progressUpdateStream: String
        /// Information about the task's progress and status.
        public let task: Task
        /// The timestamp when the task was gathered.
        public let updateDateTime: Date

        public init(dryRun: Bool? = nil, migrationTaskName: String, nextUpdateSeconds: Int, progressUpdateStream: String, task: Task, updateDateTime: Date) {
            self.dryRun = dryRun
            self.migrationTaskName = migrationTaskName
            self.nextUpdateSeconds = nextUpdateSeconds
            self.progressUpdateStream = progressUpdateStream
            self.task = task
            self.updateDateTime = updateDateTime
        }

        public func validate(name: String) throws {
            try self.validate(self.migrationTaskName, name: "migrationTaskName", parent: name, max: 256)
            try self.validate(self.migrationTaskName, name: "migrationTaskName", parent: name, min: 1)
            try self.validate(self.migrationTaskName, name: "migrationTaskName", parent: name, pattern: "[^:|]+")
            try self.validate(self.nextUpdateSeconds, name: "nextUpdateSeconds", parent: name, min: 0)
            try self.validate(self.progressUpdateStream, name: "progressUpdateStream", parent: name, max: 50)
            try self.validate(self.progressUpdateStream, name: "progressUpdateStream", parent: name, min: 1)
            try self.validate(self.progressUpdateStream, name: "progressUpdateStream", parent: name, pattern: "[^/:|\\000-\\037]+")
            try self.task.validate(name: "\(name).task")
        }

        private enum CodingKeys: String, CodingKey {
            case dryRun = "DryRun"
            case migrationTaskName = "MigrationTaskName"
            case nextUpdateSeconds = "NextUpdateSeconds"
            case progressUpdateStream = "ProgressUpdateStream"
            case task = "Task"
            case updateDateTime = "UpdateDateTime"
        }
    }

    public struct NotifyMigrationTaskStateResult: AWSDecodableShape {
        public init() {}
    }

    public struct ProgressUpdateStreamSummary: AWSDecodableShape {
        /// The name of the ProgressUpdateStream. Do not store personal data in this field.
        public let progressUpdateStreamName: String?

        public init(progressUpdateStreamName: String? = nil) {
            self.progressUpdateStreamName = progressUpdateStreamName
        }

        private enum CodingKeys: String, CodingKey {
            case progressUpdateStreamName = "ProgressUpdateStreamName"
        }
    }

    public struct PutResourceAttributesRequest: AWSEncodableShape {
        /// Optional boolean flag to indicate whether any effect should take place. Used to test if the caller has permission to make the call.
        public let dryRun: Bool?
        /// Unique identifier that references the migration task. Do not store personal data in this field.
        public let migrationTaskName: String
        /// The name of the ProgressUpdateStream.
        public let progressUpdateStream: String
        /// Information about the resource that is being migrated. This data will be used to map the task to a resource in the Application Discovery Service repository.  Takes the object array of ResourceAttribute where the Type field is reserved for the following values: IPV4_ADDRESS | IPV6_ADDRESS | MAC_ADDRESS | FQDN | VM_MANAGER_ID | VM_MANAGED_OBJECT_REFERENCE | VM_NAME | VM_PATH | BIOS_ID | MOTHERBOARD_SERIAL_NUMBER where the identifying value can be a string up to 256 characters.     If any "VM" related value is set for a ResourceAttribute object, it is required that VM_MANAGER_ID, as a minimum, is always set. If VM_MANAGER_ID is not set, then all "VM" fields will be discarded and "VM" fields will not be used for matching the migration task to a server in Application Discovery Service repository. See the Example section below for a use case of specifying "VM" related values.    If a server you are trying to match has multiple IP or MAC addresses, you should provide as many as you know in separate type/value pairs passed to the ResourceAttributeList parameter to maximize the chances of matching.
        public let resourceAttributeList: [ResourceAttribute]

        public init(dryRun: Bool? = nil, migrationTaskName: String, progressUpdateStream: String, resourceAttributeList: [ResourceAttribute]) {
            self.dryRun = dryRun
            self.migrationTaskName = migrationTaskName
            self.progressUpdateStream = progressUpdateStream
            self.resourceAttributeList = resourceAttributeList
        }

        public func validate(name: String) throws {
            try self.validate(self.migrationTaskName, name: "migrationTaskName", parent: name, max: 256)
            try self.validate(self.migrationTaskName, name: "migrationTaskName", parent: name, min: 1)
            try self.validate(self.migrationTaskName, name: "migrationTaskName", parent: name, pattern: "[^:|]+")
            try self.validate(self.progressUpdateStream, name: "progressUpdateStream", parent: name, max: 50)
            try self.validate(self.progressUpdateStream, name: "progressUpdateStream", parent: name, min: 1)
            try self.validate(self.progressUpdateStream, name: "progressUpdateStream", parent: name, pattern: "[^/:|\\000-\\037]+")
            try self.resourceAttributeList.forEach {
                try $0.validate(name: "\(name).resourceAttributeList[]")
            }
            try self.validate(self.resourceAttributeList, name: "resourceAttributeList", parent: name, max: 100)
            try self.validate(self.resourceAttributeList, name: "resourceAttributeList", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case dryRun = "DryRun"
            case migrationTaskName = "MigrationTaskName"
            case progressUpdateStream = "ProgressUpdateStream"
            case resourceAttributeList = "ResourceAttributeList"
        }
    }

    public struct PutResourceAttributesResult: AWSDecodableShape {
        public init() {}
    }

    public struct ResourceAttribute: AWSEncodableShape & AWSDecodableShape {
        /// Type of resource.
        public let type: ResourceAttributeType
        /// Value of the resource type.
        public let value: String

        public init(type: ResourceAttributeType, value: String) {
            self.type = type
            self.value = value
        }

        public func validate(name: String) throws {
            try self.validate(self.value, name: "value", parent: name, max: 256)
            try self.validate(self.value, name: "value", parent: name, min: 1)
            try self.validate(self.value, name: "value", parent: name, pattern: "^.{1,256}$")
        }

        private enum CodingKeys: String, CodingKey {
            case type = "Type"
            case value = "Value"
        }
    }

    public struct Task: AWSEncodableShape & AWSDecodableShape {
        /// Indication of the percentage completion of the task.
        public let progressPercent: Int?
        /// Status of the task - Not Started, In-Progress, Complete.
        public let status: Status
        /// Details of task status as notified by a migration tool. A tool might use this field to provide clarifying information about the status that is unique to that tool or that explains an error state.
        public let statusDetail: String?

        public init(progressPercent: Int? = nil, status: Status, statusDetail: String? = nil) {
            self.progressPercent = progressPercent
            self.status = status
            self.statusDetail = statusDetail
        }

        public func validate(name: String) throws {
            try self.validate(self.progressPercent, name: "progressPercent", parent: name, max: 100)
            try self.validate(self.progressPercent, name: "progressPercent", parent: name, min: 0)
            try self.validate(self.statusDetail, name: "statusDetail", parent: name, max: 500)
            try self.validate(self.statusDetail, name: "statusDetail", parent: name, min: 0)
            try self.validate(self.statusDetail, name: "statusDetail", parent: name, pattern: "^.{0,500}$")
        }

        private enum CodingKeys: String, CodingKey {
            case progressPercent = "ProgressPercent"
            case status = "Status"
            case statusDetail = "StatusDetail"
        }
    }
}
